<template>
  <div class="index">
    <header>
      <div class="bigTitle">
        <img
          class="bgp"
          src="../assets/Snipaste_2021-12-29_09-56-31.png"
          alt=""
        />
        <span>一亩茶园</span> <span>|</span> <span>专注有机</span>
      </div>
      <div class="rightOptions">
        <router-link to="/firstPage"> 首页</router-link>

        <a-popover placement="bottom">
          <template slot="content">
            <!-- <router-link to="/brandHonor" style="color: #a37c42">
              品牌荣誉</router-link
            > -->
            <router-link to="/brandStory" style="color: #a37c42">
              品牌故事</router-link
            >
          </template>
          <router-link to="/brandStory"> 品牌</router-link>
        </a-popover>

        <a-popover placement="bottom">
          <template slot="content">
            <router-link
              to="/WhiteTea"
              style="color: #a37c42; margin-right: 30px"
            >
              有机白茶</router-link
            >
            <router-link
              to="/WhiteTea"
              style="color: #a37c42; margin-right: 30px"
            >
              有机红茶</router-link
            >
            <router-link
              to="/GiftBox"
              style="color: #a37c42; margin-right: 30px"
            >
              茶叶礼盒</router-link
            >
          </template>
          <router-link to="/WhiteTea"> 产品</router-link>
        </a-popover>

        <a-popover placement="bottom">
          <template slot="content">
            <a
              href="https://item.jd.com/67061826876.html"
              style="color: #a37c42; margin-right: 30px"
              >京东旗舰店</a
            >
            <a
              href="https://list.tmall.com/search_product.htm?q=%E4%B8%80%E4%BA%A9%E8%8C%B6%E5%9B%AD&type=p&vmarket=&spm=875.7931836%2FB.a2227oh.d100&from=mallfp..pc_1_searchbutton"
              style="color: #a37c42"
              >天猫旗舰店</a
            >
          </template>
          <a> 在线商城</a>
        </a-popover>

        <keep-alive>
          <router-link to="/zsjm"> 招商加盟</router-link>
        </keep-alive>

        <div>
          <a-input-search
            placeholder=""
            style="width: 200px"
            @search="onSearch"
          />
        </div>
      </div>
    </header>

    <article>
      <router-view></router-view>
    </article>

    <footer class="footer">
      <div class="first-icon">
        <div @click="gotoWeibo">
          <img src="../assets/新浪微博.png" alt="" />
          <p>新浪微博</p>
        </div>

        <div>
          <!-- <img src="../assets/微信.svg" alt="" />
          <p>微信</p> -->
          <a-popover>
            <template slot="content"> 二维码维护中 </template>
            <img src="../assets/微信.svg" alt="" />
            <p>微信公众号</p>
          </a-popover>
        </div>
        <div @click="gotoJD">
          <img src="../assets/京东.png" alt="" />
          <p>一亩茶园旗舰店</p>
        </div>
        <div @click="gotoTM">
          <img src="../assets/天猫.png" alt="" />
          <p>一亩茶园旗舰店</p>
        </div>
      </div>
      <div class="second-line">
        <router-link to="/zsjm" class="bottom-options"> 经销商加盟</router-link>
        <span>|</span>
        <router-link to="/findSearch" class="bottom-options">
          门店查询</router-link
        >
        <span>|</span>
        <router-link to="/serect" class="bottom-options"> 隐私声明</router-link>

        <span>|</span>
        <router-link to="/suggest" class="bottom-options">
          建议与反馈</router-link
        >
        <span>|</span>
        <router-link to="/needWorker" class="bottom-options">
          人才招聘</router-link
        >
        <span>|</span>
        <router-link to="/callMe" class="bottom-options"> 联系我们</router-link>
      </div>
      <div class="other-line">四川省一亩茶园有限公司</div>
      <div class="other-line">蜀ICP备88888888号-1</div>
      <div class="other-line">市场有风险，投资需谨慎</div>
    </footer>
  </div>
</template>

<script>
// @ is an alias to /src
// import HelloWorld from "@/components/HelloWorld.vue";

export default {
  name: "Index",
  components: {
    // HelloWorld,
  },
  methods: {
    onSearch() {
      // 跳转百度
      window.location.href = "https://www.baidu.com/?tn=59044660_1_hao_pg";
    },
    gotoWeibo() {
      window.location.href =
        "https://weibo.com/u/6218493191?refer_flag=1005055013_";
    },
    gotoJD() {
      window.location.href = "https://item.jd.com/67061826876.html";
    },
    gotoTM() {
      window.location.href =
        "https://list.tmall.com/search_product.htm?q=%E4%B8%80%E4%BA%A9%E8%8C%B6%E5%9B%AD&type=p&vmarket=&spm=875.7931836%2FB.a2227oh.d100&from=mallfp..pc_1_searchbutton";
    },
    // 前往所有产品页面
    gotoAllProduct() {
      this.$router.push({ name: "Allproduct" });
    },
  },
};
</script>

<style lang="less" scoped>
.index {
  width: 99vw;
  height: auto;

  header {
    width: 100%;
    height: 80px;
    background-color: #191919;
    box-sizing: border-box;
    padding-left: 10%;
    padding-right: 10%;
    display: flex;
    justify-content: space-between;
    color: white;
    align-items: center;
    overflow: hidden;
    .bigTitle {
      width: 30%;
      & > span {
        margin-right: 20px;
      }
      & > span:nth-of-type(1) {
        font-size: 36px;
      }
      & > span:nth-of-type(2) {
        font-size: 32px;
      }
      & > span:nth-of-type(3) {
        font-size: 28px;
      }

      .bgp {
        width: 80px;
        height: 80px;
        margin-right: 20px;
      }
    }
    .rightOptions {
      width: 60%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-evenly;
    }
    .rightOptions > a {
      height: 70px;
      display: flex;
      justify-content: center;
      align-items: center;
      color: white;
    }
    .rightOptions > a:hover {
      border-bottom: 1px solid #a37c42;
    }
  }
  article {
    height: 80vh;
    overflow: scroll;
    width: 99vw;
  }
  ::-webkit-scrollbar {
    display: none;
  }
  footer {
    height: 256px;
    background-image: url("../assets/footer.png");
    background-size: 100%;

    box-sizing: border-box;
    padding-top: 40px;
    .first-icon {
      box-sizing: border-box;
      padding-left: 30%;
      padding-right: 30%;
      display: flex;
      justify-content: space-evenly;
      font-size: 16px;
      color: #a37c42;
      cursor: pointer;
      img {
        width: 72px;
        height: 36px;
        margin-bottom: 10px;
      }
      p:hover {
        color: white;
      }
    }
    .second-line {
      box-sizing: border-box;
      padding-left: 30%;
      padding-right: 30%;
      display: flex;
      justify-content: space-evenly;
      font-size: 16px;
      // color: #a37c42;
      cursor: pointer;
      span {
        color: white;
      }
      .bottom-options {
        color: white;
      }
      .bottom-options:hover {
        color: #a37c42;
      }
    }
    .other-line {
      font-size: 16px;
      color: #a37c42;
      cursor: pointer;
      margin-top: 10px;
    }
  }
}
</style>
